package ar.com.psicosoft.model.psicosoft;

import java.io.Serializable;
import javax.persistence.*;

/**
 * The primary key class for the "tratamientoDiagnostico" database table.
 * 
 */
@Embeddable
public class TratamientoDiagnosticoPK implements Serializable {
	//default serial version id, required for serializable classes.
	private static final long serialVersionUID = 1L;

	@Column(name="\"idTratamiento\"", insertable=false, updatable=false, unique=true, nullable=false)
	private Integer idTratamiento;

	@Column(name="\"idDiagnostico\"", insertable=false, updatable=false, unique=true, nullable=false)
	private Integer idDiagnostico;

	public TratamientoDiagnosticoPK() {
	}
	public Integer getIdTratamiento() {
		return this.idTratamiento;
	}
	public void setIdTratamiento(Integer idTratamiento) {
		this.idTratamiento = idTratamiento;
	}
	public Integer getIdDiagnostico() {
		return this.idDiagnostico;
	}
	public void setIdDiagnostico(Integer idDiagnostico) {
		this.idDiagnostico = idDiagnostico;
	}

	public boolean equals(Object other) {
		if (this == other) {
			return true;
		}
		if (!(other instanceof TratamientoDiagnosticoPK)) {
			return false;
		}
		TratamientoDiagnosticoPK castOther = (TratamientoDiagnosticoPK)other;
		return 
			this.idTratamiento.equals(castOther.idTratamiento)
			&& this.idDiagnostico.equals(castOther.idDiagnostico);
	}

	public int hashCode() {
		final int prime = 31;
		int hash = 17;
		hash = hash * prime + this.idTratamiento.hashCode();
		hash = hash * prime + this.idDiagnostico.hashCode();
		
		return hash;
	}
}